Method for data storage, general service entity device, and storage medium

ABSTRACT

The present disclosure provides a method for data storage, a general service entity device, and a storage medium. The method for data storage includes: by adopting a general service entity, receiving data sent by an application entity; performing a lock setting or an overflow setting; selecting a retention strategy for previously stored data according to the lock setting or the overflow setting in the case of satisfying a data overflow condition; and storing part or all of received data according to the retention strategy.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims the priority of Chinese patentapplication No. 201811436152.0, filed on Nov. 28, 2018, the entiredisclosure of which is incorporated herein by reference as part of thedisclosure of this application.

TECHNICAL FIELD

The present disclosure relates to the field of data storage, inparticular to a method for data storage, a general service entitydevice, and a storage medium.

BACKGROUND

In the field of data storage, data uploaded by application entities maybe received through general service entities. In the case whereenvironment values of the application entity change rapidly and requirehigh accuracy, for example, in scenarios such as ocean currents andsubmarine volcano temperature monitoring, the application entity uploadsdata at a high speed, which may soon break through the storage limit ofthe general service entity on data resource capacity. When the uploadeddata reaches the maximum resource capacity storage limit of the generalservice entity, data may overflow.

SUMMARY

The present disclosure provides a method for data storage, a generalservice entity device, and a storage medium.

According to the first aspect of the present disclosure, a method fordata storage is provided, and the method includes: by adopting a generalservice entity, receiving data sent by an application entity; performinga lock setting or an overflow setting; selecting a retention strategyfor previously stored data according to the lock setting or the overflowsetting in a case of satisfying a data overflow condition; and storingpart or all of received data according to the retention strategy.

According to the second aspect of the present disclosure, a method fordata storage is provided, and the method includes: by adopting anapplication entity, uploading data to a general service entity, wherethe data is stored in the general service entity; and replacing storeddata in the general service entity with newly uploaded data according toa retention strategy determined based on a lock setting or an overflowsetting of the general service entity in a case of satisfying a dataoverflow condition.

According to the third aspect of the present disclosure, a method fordata storage is provided, and the method includes: by adopting a generalservice entity, receiving and storing data sent by an applicationentity; and in a case of satisfying a data overflow condition, thegeneral service entity retaining first data in each time interval andsequentially replacing remaining data in each time interval with newlyreceived data in a sequence of storage time according to a presetoverflow time interval.

According to the fourth aspect of the present disclosure, a generalservice entity device is provided, and the general service entity deviceincludes: a receiving unit, configured to receive data sent by anapplication entity; a storage unit, configured to store the datareceived by the receiving unit; and a selection unit, configured toperform a lock setting or an overflow setting for stored data in a caseof satisfying a data overflow condition and select a retention strategyfor the stored data according to the lock setting or the overflowsetting of the stored data; and the storage unit is further configuredto store newly received data according to the retention strategy.

According to the fifth aspect of the present disclosure, a computerreadable storage medium for storing a computer readable program isprovided, and the program enables a computer to perform the method fordata storage as described above.

The above aspects of the present disclosure provide a retention strategyof sending an early warning to the application entity in the case wheredata is about to overflow, so as to adjust the stored data in time, andfurther provide a retention strategy of sending notification to theapplication entity in the case where data overflows, so as to adjust thestored data in time, so that data loss is accordingly avoided.

BRIEF DESCRIPTION OF THE DRAWINGS

By describing the embodiments of the present disclosure in more detailwith reference to the accompanying drawings, the above and otherobjectives, features, and advantages of the present disclosure maybecome more apparent. The drawings are used to provide a furtherunderstanding of the embodiments of the present disclosure, andconstitute a part of the specification. The drawings are used to explainthe present disclosure together with the embodiments of the presentdisclosure, and are not limitative to the present disclosure. The samereference numerals in different drawings are used to refer to the samedescribed components or steps.

FIG. 1 is a schematic diagram of a data storage system used to implementan embodiment of the present disclosure;

FIG. 2 is a flowchart of a method for data storage used to implement anembodiment of the present disclosure;

FIG. 3 is a schematic diagram of resources for overflow settingaccording to an embodiment of the present disclosure;

FIG. 4 is a schematic diagram of an operation A to be performedsubsequent to setting an overflow resource according to an embodiment ofthe present disclosure;

FIG. 5 is a schematic diagram of an operation B to be performedsubsequent to setting an overflow resource according to an embodiment ofthe present disclosure;

FIG. 6 is a schematic diagram of an example of uploading and backing upstored data according to an embodiment of the present disclosure;

FIG. 7 is a schematic diagram of an operation C to be performedsubsequent to setting an overflow resource according to an embodiment ofthe present disclosure;

FIG. 8 is a schematic diagram of an example of partially retainingstored data according to a point in time according to an embodiment ofthe present disclosure;

FIG. 9 is a schematic diagram of an operation D to be performedsubsequent to setting an overflow resource according to an embodiment ofthe present disclosure;

FIG. 10(a) and FIG. 10(b) are schematic diagrams of an example ofpartially retaining stored data according to a rate of change accordingto an embodiment of the present disclosure;

FIG. 11 is a schematic diagram of an operation E to be performedsubsequent to setting an overflow resource according to an embodiment ofthe present disclosure;

FIG. 12(a) and FIG. 12(b) are schematic diagrams of an example ofpartially retaining stored data in a difference manner according to anembodiment of the present disclosure;

FIG. 13 is a schematic diagram of setting an overflow resource warningaccording to an embodiment of the present disclosure;

FIG. 14 is a flowchart of a method for data storage according to anotherembodiment of the present disclosure;

FIG. 15 is a schematic diagram of an example in which other applicationentities obtain required target data from a general service entityaccording to an embodiment of the present disclosure;

FIG. 16 is a schematic diagram of an example in which other applicationentities obtain required target data from a general service entityaccording to another embodiment of the present disclosure;

FIG. 17 is a schematic diagram of an example in which other applicationentities obtain required target data from a general service entityaccording to still another embodiment of the present disclosure;

FIG. 18 is a schematic diagram of an example in which other applicationentities obtain required target data from a general service entityaccording to further still another embodiment of the present disclosure;

FIG. 19 is a flowchart of a method for data storage according to stillanother embodiment of the present disclosure;

FIG. 20 is a schematic diagram of a device for data storage according toan embodiment of the present disclosure; and

FIG. 21 is a schematic diagram of a device for data storage according toanother embodiment of the present disclosure.

DETAILED DESCRIPTION

The technical solutions of the embodiments of the present disclosurewill be described in a clearly and fully understandable way inconnection with the drawings related to the embodiments of the presentdisclosure. Apparently, the described embodiments are just a part butnot all of the embodiments of the present disclosure. Based on thedescribed embodiments herein, those skilled in the art can obtain otherembodiment(s), without any inventive work, which should be within thescope of the present disclosure.

First, a data storage system for implementing an embodiment of thepresent disclosure is described with reference to FIG. 1. As illustratedin FIG. 1, in the data storage system, an application entity (AE) 10uploads data 14 to a general service entity (i.e., a common serviceentity, CSE) 11. Then the general service entity 11 creates a contentinstance for each request of the application entity 10. For example, theapplication entity 10 may be a sensor, such as a sensor of an airconditioner, and the data uploaded to the general service entity may bedata such as humidity, temperature, etc. In this way, the generalservice entity 11 may create a resource container for the sensor, andthe information of the content instance, such as humidity, temperature,and the like, may be accordingly stored in the resource container. Inthe case where the data uploaded by the application entity 10 reachesthe maximum capacity storage limit of the general service entity, it maycause data overflow 13. The present disclosure provides a retentionstrategy of sending an early warning to the application entity in thecase where data is about to overflow, so as to adjust the stored data intime, and further provides a retention strategy of sending notificationto the application entity in the case where data overflows, so as toadjust the stored data in time.

The method for data storage used to implement the embodiments of thepresent disclosure is described below with reference to FIG. 2. Themethod can be executed by the general service entity 11.

As illustrated in FIG. 2, in Step S101, the general service entity 11may receive data sent by the application entity 10. For example, theapplication entity 10 may be a sensor as described above.

In Step S102, in the case where data overflows, the general serviceentity 11 selects a corresponding retention strategy for stored dataaccording to a lock setting or an overflow setting.

In Step S103, according to the retention strategy, part or all of theoverflow data is stored.

As mentioned above, when data overflow occurs, the normal practice is todirectly replace the old stored data with the newly uploaded data, butthis may lead to loss of the original record, which is impossible torealize functions such as obtaining the history record table, historyrecord graph, or the like, and the flexibility is poor. In addition, thenormal practice also lacks the following functions: the retentionstrategy of notifying the application entity when data overflows so asto adjust the stored data in time, and the retention strategy ofalerting the application entity when data is about to overflow so as toadjust the stored data in time. However, in the case where acorresponding retention strategy is selected for the stored dataaccording to the lock setting or the overflow setting, the data loss canbe accordingly avoided.

Hereinafter, the resource of the overflow setting (overflowCfg) 30according to an embodiment of the present disclosure is described withreference to FIG. 3. As mentioned above, the general service entity 11may create one resource container for the application entity 10, and theinformation of the content instance, such as humidity, temperature, andthe like, can be accordingly stored in the resource container. Inaddition, the general service entity 11 may also create the resource ofthe overflow setting (overflowCfg) 30 for the application entity 10 inthe resource container, which may serve as the sub-resource of theresource container to store information related to overflow.

The overflow setting 30 may include a status of whether the data isperformed the lock setting (overflowReserveStatus), that is, a lockstatus 31.

The lock setting (overflowReserve) 32 may include locking the dataaccording to the lock time period or rate of change of lock data. Whendata overflows, the stored data generated during the preset lock timeperiod or the stored data in accord with the preset rate of change oflock data is locked and may not be deleted. Alternatively, the locksetting (overflowReserve) and the status of whether the data isperformed the lock setting (overflowReserveStatus) may also be providedin the resource container, which may serve as the sub-resource orattribute value of the resource container to store information relatedto lock.

For example, the lock status 31 may be set to Yes/No (or True/False), soas to clearly show whether the data is performed the lock setting.

The lock setting 32 may include setting according to the lock timeperiod. For example, the lock time period can be preset, and then thedata generated during the lock time period is locked and may not bedeleted when data overflow occurs. For example, the lock time period maybe set as 00:00:00-00:07:00 and 01:00:00-02:59:59, and then the data(dataGenerationTime) generated in these two time periods is locked andmay not be deleted when data overflow occurs. When one or both of theabove two lock time periods are deleted in the setting, the datacorresponding to the deleted time period accordingly loses the lockedattribute and may no longer be limited by the lock strategy when thedata overflows. It should be noted that the above examples are merelyillustrative and do not limit the content to be protected by the presentdisclosure, and the present disclosure may also include otherappropriate examples.

In addition, for example, the lock setting 32 may include settingaccording to the rate of change of lock data. For example, the rate ofchange of lock data can be preset, and then data greater than the rateof change of lock data is locked and may not be deleted when dataoverflow occurs. For example, the rate of change of lock data may be setas 1 km/h. When the data overflow occurs, the data instance in the datalist is screened. If the rate of change of two data separated by onehour is greater than one kilometer, all data between the two data may belocked and may not be deleted when overflow occurs.

In addition, the overflow setting 30 may further include setting aspecific overflow category (overflowCat) 36.

For example, the overflow category 36 may be set to the maximum bitvalue (maxByteSize), the maximum number of instances (maxNrOflnstances),the maximum instance servicelife (maxInstanceAge), etc. It should benoted that the above settings are merely illustrative and do not limitthe content to be protected by the present disclosure, and the presentdisclosure may further include other appropriate settings.

Further, the overflow setting may further include setting the overflowstatus (overflowStatus) 33 of whether the overflow occurs.

For example, the overflow status 33 can be set to Yes/No (orTrue/False), so as to clearly show whether overflow occurs. In addition,different overflow categories 36 may also be set to any overflow status.For example, the overflow status may be set for one or more of a groupconsisting of the maximum bit value, the maximum number of instances,and the maximum instance service life.

Further, the overflow setting 30 may further include setting whether arelated operation (overflowCtrl) is performed subsequent to the overflow34.

For example, whether a related operation is performed subsequent to theoverflow 34 may be set to Yes/No (or True/False), so as to clearly showwhether a related operation is performed subsequent to the overflow.

Further, the overflow setting 30 may further include setting theoperation (overflowOp) to be performed subsequent to the overflow 35,and the setting corresponds to at least one of the above retentionstrategies.

For example, operations to be performed subsequent to the overflow maybe set with different numbers, and for example, may include an operationA to be performed subsequent to the overflow 37(overflowOpOneDescription), an operation B to be performed subsequent tothe overflow 38 (overflowOpTwoDescription), an operation C to beperformed subsequent to the overflow 39 (overflowOpThreeDescription), anoperation D to be performed subsequent to the overflow 40(overflowOpFourDescription), an operation E to be performed subsequentto the overflow 41 (overflowOpFiveDescription), and an operation F to beperformed subsequent to the overflow 42 (overflowOpSixDescription). Thedifferent numbers indicate different operations, so as to clearly showwhether a related operation is performed subsequent to the overflow orwhich retention strategy is selected.

For example, selecting the corresponding retention strategy for the dataaccording to the overflow setting may include selecting at least one ofthe following retention strategies: performing a local backup of thestored data, uploading and backing up the stored data, partiallyretaining the stored data according to a point in time, partiallyretaining the stored data according to a rate of change, partiallyretaining the stored data according to a difference manner, andreplacing the stored data with newly uploaded data.

For example, the operation A to be performed subsequent to the overflowmay be set as performing a local backup of the stored data as describedabove.

FIG. 4 is a schematic diagram of an operation A to be performedsubsequent to setting an overflow resource according to an embodiment ofthe present disclosure. As illustrated in FIG. 4, in the case where theoperation A 37 is to be performed after overflow, different attributevalues can be set for the operation A to perform the local backup. Forexample, the root directory location of the backup resource(overflowBackUpPosition) 46, the backup list (overflowBackUpList) 47,and the point in time where the backup occurred(overflowBackUpTimePoint) 48 can be set for the operation A. It shouldbe noted that the above settings are merely illustrative and do notlimit the content to be protected by the present disclosure, and thepresent disclosure may also include other appropriate settings.

For example, the operation B to be performed subsequent to the overflowmay be set as uploading and backing up the stored data as describedabove.

FIG. 5 is a schematic diagram of an operation B to be performedsubsequent to setting an overflow resource according to an embodiment ofthe present disclosure. As illustrated in FIG. 5, in the case where theoperation B 38 is to be performed after overflow, the root directorylocation of the upload resource (overflowUpLoadPosition) 56, the uploadlist (overflowUpLoadList) 57, and the point in time where the uploadoccurred (overflowUpLoadTimePoint) 58 may also be set for the operationB. It should be noted that the above settings are merely illustrativeand do not limit the content to be protected by the present disclosure,and the present disclosure may also include other appropriate settings.

FIG. 6 is a schematic diagram of an example of uploading and backing upstored data according to an embodiment of the present disclosure. Asillustrated in FIG. 6, the AE 60 uploads data 63 to the middle nodegeneral service entity (i.e., a middle node common service entity,MN-CSE) 61, and then the MN-CSE 61 creates a content instance 64 foreach request of the AE 60. In the case where the data uploaded by the AE60 reaches the maximum capacity storage limit of the MN-CSE 61, dataoverflow 65 occurs. In this case, the MN-CSE 61 may upload the storeddata to other general service entities (for example, the storage CSE 62illustrated in FIG. 6) to perform data backup 66, and delete the dataoriginally stored in the MN-CSE 61. Then there is extra capacity in theMN-CSE 61 to store the data continuously uploaded by the AE60, and theMN-CSE 61 continues to create a content instance 68 for each request ofthe AE 60.

For example, the operation C to be performed subsequent to the overflowmay be set to partially retain the stored data according to a point intime.

FIG. 7 is a schematic diagram of an operation C to be performedsubsequent to setting an overflow resource according to an embodiment ofthe present disclosure. As illustrated in FIG. 7, in the case where theoperation C 39 is to be performed after overflow, different attributevalues can be set for the operation C to partially retain the storeddata according to the time point. For example, an overflow time interval(overflowReserveTimePeriod) 76 may be set for the operation C. It shouldbe noted that the above settings are merely illustrative and do notlimit the content to be protected by the present disclosure, and thepresent disclosure may also include other appropriate settings.

FIG. 8 is a schematic diagram of an example of partially retainingstored data according to a point in time according to an embodiment ofthe present disclosure. As illustrated in FIG. 8, supposing that theoverflow time interval 76 is set to 1 hour, the first integer point inthe data queue is assumed as the start value, and the first piece ofdata in this time period is retained. As illustrated in FIG. 8, fivepieces of data 81 are newly added after the overflow 80 at time 05:20,and there are six pieces of data in the time period 00:00-01:00. Thenthe first integer point in the queue is taken as the start point, thefirst piece of data 83 is retained, and the remaining five pieces ofdata 84 are replaced, that is, the five pieces of data 84 after the sixpieces of data in the time period 00:00-01:00 are deleted and replacedwith five pieces of data 81 newly added after the overflow at time05:20. Next, two pieces of data 82 are added, time 01:00 is theimportant point of the new time interval after time 00:00, the firstpiece of data 85 after time 01:00 is retained, and the last two piecesof data 86 of the three pieces of data in the time period 01:00-02:00are deleted and replaced with two pieces of data 82 newly added afterthe overflow at time 05:20.

For example, the operation D to be performed subsequent to the overflowmay be set to partially retain the stored data according to a rate ofchange as described above.

FIG. 9 is a schematic diagram of an operation D to be performedsubsequent to setting an overflow resource according to an embodiment ofthe present disclosure. As illustrated in FIG. 9, in the case where theoperation D 40 is to be performed subsequent to overflow, differentattribute values can be set for the operation D to partially retain thestored data according to a rate of change. For example, the overflowreplacement start point (overflowReserveValuePoint) 96, the overflowvalue interval (overflowReserveValueChange) 97, and the like may be setfor the operation D. It should be noted that the above settings aremerely illustrative and do not limit the content to be protected by thepresent disclosure, and the present disclosure may also include otherappropriate settings.

FIG. 10(a) and FIG. 10(b) are schematic diagrams of an example ofpartially retaining stored data according to a rate of change accordingto an embodiment of the present disclosure. As illustrated in FIG. 10(a)and FIG. 10(b), assuming that the maximum amount of data that thegeneral service entity can store is set to 12, overflow occurs when thetwelfth piece of data is established. Assuming that the overflowreplacement start point 96 is set to 2, and the overflow value interval97 is set to 1, it means that starting from the overflow, thereplacement is performed from the second piece of data originallystored, and the last piece of data of the two adjacent pieces oforiginal data which are of values in the same interval is replaced. Asillustrated in FIG. 10(b), as time goes by, overflow occurs at thetwelfth piece of data. When the thirteenth piece of new data isestablished after the overflow occurs, according to the rules, startingfrom the leftmost side of the time axis, the first piece of dataoriginally stored is the start point and is not replaced; the secondpiece of data originally stored is in the 1-2 interval, which isdifferent from the 2-3 interval of the first piece of data originallystored (that is, the value of the first piece of data originally storedand the value of the second piece of data originally stored are not inthe same interval), and is not replaced; the third piece of dataoriginally stored is in the 2-3 interval, which is different from the1-2 interval of the second piece of data originally stored, and is notreplaced; the fourth piece of data originally stored is in the 3-4interval, which is different from the 2-3 interval of the third piece ofdata originally stored, and is not replaced; the fifth piece of dataoriginally stored is in the 3-4 interval, which is identical to the 3-4interval of the fourth piece of data originally stored (that is, thevalue of the fifth piece of data originally stored and the value of thefourth piece of data originally stored are in the same interval), and isdeleted and replaced, and the fifth piece of data is replaced with thethirteenth piece of new data; and so on.

For another example, when the fourteenth piece of new data is created,analysis is the same as described above. The 4-5 interval of the sixthpiece of data originally stored is different from the 3-4 interval ofthe fifth piece of data originally stored, and the sixth piece of dataoriginally stored is not replaced; the 3-4 interval of the seventh pieceof data originally stored is different from the 4-5 interval of thesixth piece of data originally stored, and the seventh piece of dataoriginally stored is not replaced; the 3-4 interval of the eighth pieceof data originally stored is identical to the 3-4 interval of theseventh piece of data originally stored, and the eighth piece of dataoriginally stored is deleted and replaced with the fourteenth piece ofnew data; and so on.

For example, the operation E to be performed subsequent to the overflowmay be set to partially retain the stored data according to a differencemanner.

FIG. 11 is a schematic diagram of an operation E to be performedsubsequent to setting an overflow resource according to an embodiment ofthe present disclosure. As illustrated in FIG. 11, in the case where theoperation E 41 is to be performed after overflow, different attributevalues can be set for the operation E 41 to partially retain the storeddata according to a difference manner. For example, the overflowretention interval (overflowReserveInterval) 111 and the like can be setfor the operation E 41. It should be noted that the above settings aremerely illustrative and do not limit the content to be protected by thepresent disclosure, and the present disclosure may also include otherappropriate settings.

FIG. 12(a) and FIG. 12(b) are schematic diagrams of an example ofpartially retaining stored data in a difference manner according to anembodiment of the present disclosure. As illustrated in FIG. 12 (a) andFIG. 12(b), assuming that the maximum amount of data that the generalservice entity can store is set to 12, overflow occurs when the twelfthpiece of data is established. Assuming that the overflow retentioninterval 111 is set to 1, as time goes by, starting from the leftmostside of the time axis, retention is performed from the first piece ofdata. Adding the first piece of new data (corresponding to thethirteenth piece of new data) after the overflow corresponds to deletingthe second piece of data originally stored in the queue, adding thesecond piece of new data (corresponding to the fourteenth piece of newdata) after the overflow corresponds to deleting the fourth piece ofdata originally stored in the queue, adding the third piece of data(corresponding to the fifteenth piece of new data) after the overflowcorresponds to deleting the sixth piece of data originally stored in thequeue, and so on.

For example, the operation F to be performed subsequent to the overflowmay be set to replace the stored data with newly uploaded data asdescribed above. This method is the same as the traditional method ofdirectly replacing the originally stored data with the overflowed data,and therefore, details are not described herein.

Returning to FIG. 3, the overflow setting may further include a functionof overflow early warning 43 that sends an early warning notification tothe application entity in the condition that the stored data reaches theearly warning threshold. For example, in the condition that the storeddata reaches the early warning threshold, the early warning notificationis sent to other application entities subscribing to resource of data inthe general service entity.

FIG. 13 is a schematic diagram of setting an overflow resource warningaccording to an embodiment of the present disclosure. As illustrated inFIG. 13, an early warning threshold (warningLevel) 136, an early warningobject (notificationURI) 137, an early warning category (warningCat)138, and the like can be set for the overflow early warning 43. Theearly warning object (notificationURI) 137 indicates the object ortarget address that needs to be provided early warning. The earlywarning category 138 indicates the specific overflow category that needsto be provided early warning, such as one or more of a group consistingof the maximum bit value (maxByteSize), the maximum number of instances(maxNrOflnstances), the maximum instance service life (maxInstanceAge),and the like as described above. The early warning threshold 136indicates that an early warning notification is issued when a certaincategory reaches a predetermined threshold. For example, the earlywarning category can be set to the maximum bit value, and thecorresponding early warning threshold is 75%. When the maximum bit valueof the stored data reaches 75% of the maximum capacity, an early warningnotification is sent to the target address. It should be noted that theabove settings are merely illustrative and do not limit the content tobe protected by the present disclosure, and the present disclosure mayalso include other appropriate settings.

Moreover, in addition to the function of setting the early warningnotification in the overflow setting, the resource with subscriptionfunction in the general service entity corresponding to otherapplication entities may also include the function of issuing the earlywarning notification. In this way, in the case where the attribute ofthe subscribed resource is greater than the prescribed early warningthreshold, an early warning notification may also be sent to the targetaddress, and details are not described herein.

Hereinafter, a method for data storage according to another embodimentof the present disclosure is described with reference to FIG. 14, andthe method may be executed by the application entity 10.

Step S201: by adopting an application entity, uploading data to ageneral service entity.

Step S202: replacing stored data with newly uploaded data according to aretention strategy determined based on an overflow setting of thegeneral service entity in a case where data overflows. As describedabove, in the case where the data overflow occurs, a correspondingretention strategy is selected for the stored data according to the locksetting or overflow setting, so that the loss of data can be accordinglyavoided.

For example, the retention strategy may include at least one offollowing retention strategies: performing a local backup of the storeddata, uploading and backing up the stored data, partially retaining thestored data according to a point in time, partially retaining the storeddata according to a rate of change, partially retaining the stored dataaccording to a difference manner, and/or replacing the stored data withnewly uploaded data. Because the above strategies have been described indetail above, and details are not described herein.

Further, the overflow setting may further include receiving an earlywarning notification sent by the general service entity in a case wherethe stored data is about to overflow.

In addition, other application entities can obtain required target datafrom the general service entity. For example, other application entitiesobtaining the required target data from the general service entityincludes: in a case where all of the target data is stored in thegeneral service entity, other application entities directly extract thetarget data from the general service entity; in a case where part of thetarget data is stored in the general service entity and part of thetarget data is backed up to other general service entities, the otherapplication entities extract corresponding target data from the generalservice entity and the other general service entities, or the generalservice entity extracts part of the target data, which is not stored inthe general service entity, from the other general service entities andsends all of the target data to the other application entities; and in acase where all of the target data is stored in the other general serviceentities, the other application entities directly extract the targetdata from the other general service entities, or the general serviceentity extracts the target data from the other general service entitiesand sends the target data to the other application entities.

For example, in the case where the general service entity uploads andbacks up the data stored in the application entity, other applicationentities may obtain the required target data from the general serviceentity through two steps: (1) obtaining the address list; (2) obtainingaccording to the address. When a user entity wants to use history dataat a certain moment in history, for example, when the user entity wantsto obtain typhoon wind sampling data from 1st to 8th days on the 20thday, the other application entities should first perform the discoveryoperation on the registered CSE (for example, the registered CSE heremay be the MN-CSE described above, and as an example, the registered CSEbelow is expressed as the MN-CSE) corresponding to the applicationentity that uploads the data. The operation information specifies thetime interval for data generation. The possible cases that the MN-CSE(the registered CSE) replies the data storage address list to the otherapplication entities include:

(1) all of the data is stored in the MN-CSE;

(2) part of the data is stored in the MN-CSE, and part of the data isbacked up and stored in the CSE;

(3) all of the data is backed up and stored in the CSE.

FIG. 15 to FIG. 18 are schematic diagrams of examples in which otherapplication entities obtain required target data from a general serviceentity according to an embodiment of the present disclosure.

FIG. 15 is a schematic diagram of an example in which other applicationentities obtain the required target data from the general service entityin the case where all of the target data is stored in the MN-CSE. Asillustrated in FIG. 15, the AE 1501 uploads data 1505 to the MN-CSE1502, and then the MN-CSE 1502 creates the content instance for eachrequest 1506 of the AE 1501. When the data uploaded by the AE 1501reaches the maximum capacity storage limit of the MN-CSE 1502, dataoverflow 1507 occurs. At this time, the MN-CSE 1502 may upload thestored data to other general service entities (for example, the storageCSE 1503 illustrated in FIG. 15) to perform data backup 1508, and maydelete the data originally stored in the MN-CSE 1502. Then the MN-CSE1502 has extra capacity to store the data continuously uploaded 1509 bythe AE 1501, and continues to create the content instance 1510 for eachrequest of the AE 1501. At this time, when other application entities(AEs) 1504 want to obtain the required target data from the MN-CSE 1502,the AE 1504 first performs target data discovery 1512 to the MN-CSE1502, so as to obtain the address list of the required target data, andthe stored information of the target data can be obtained based on theobtained address list. For example, in FIG. 15, the target data obtainedbased on the obtained address list is all stored in the MN-CSE 1502,then the AE 1504 sends a target data obtaining request to the MN-CSE1502, and the MN-CSE 1502 responds to the request 1514 and sends thedata required by the AE 1504 to the AE 1504, thereby completing theprocess of the AE 1504 obtaining the target data from the MN-CSE 1502.

FIG. 16 is a schematic diagram of an example in which part of the datais stored in the MN-CSE, part of the data is backed up and stored in theCSE, and other application entities obtain the required target data fromthe general service entity. As illustrated in FIG. 16, the AE 1601uploads data 1605 to the MN-CSE 1602, and then the MN-CSE 1602 createsthe content instance 1606 for each request of the AE 1601. When the datauploaded by the AE 1601 reaches the maximum capacity storage limit ofthe MN-CSE 1602, data overflow 1607 occurs. At this time, the MN-CSE1602 may upload the stored data to other general service entities (forexample, the storage CSE 1603 illustrated in FIG. 16) to perform databackup 1608, and may delete the data originally stored in the MN-CSE1602. Then the MN-CSE 1602 has extra capacity to store the datacontinuously uploaded 1609 by the AE 1601, and continues to create thecontent instance 1610 for each request of the AE 1601. At this time,when other application entities (AEs) 1604 want to obtain the requiredtarget data from the MN-CSE 1602, the AE 1604 first performs target datadiscovery 1612 to the MN-CSE 1602, so as to obtain the address list ofthe required target data, and the stored information of the target datacan be obtained based on the obtained address list. For example, in FIG.16, part of the target data obtained based on the obtained address listis stored in the MN-CSE 1602, and part of the target data is backed upand stored in the CSE 1603. Then the AE 1604 sends a part target dataobtaining request 1613 to the MN-CSE 1602, and the MN-CSE 1602 sends apart target data obtaining request 1614 to the storage CSE 1603 as well.The storage CSE 1603 feeds back the part of the target data stored inthe storage CSE 1603 to the MN-CSE 1602 in response 1615 to the parttarget data obtaining request 1614, and the MN-CSE 1602 sends the partof the target data stored in the MN-CSE 1602 and the part of the targetdata fed back by the storage CSE 1603 to the AE 1604, thereby completingthe process of the AE 1604 obtaining the target data from the MN-CSE1602.

FIG. 17 is a schematic diagram of an example in which part of the datais stored in the MN-CSE, part of the data is backed up and stored in theCSE, and other application entities obtain the required target data fromthe general service entity. As illustrated in FIG. 17, the AE 1701uploads data 1705 to the MN-CSE 1702, and then the MN-CSE 1702 createsthe content instance 1706 for each request of the AE 1701. When the datauploaded by the AE 1701 reaches the maximum capacity storage limit ofthe MN-CSE 1702, data overflow 1707 occurs. At this time, the MN-CSE1702 may upload the stored data to other general service entities (forexample, the storage CSE 1703 illustrated in FIG. 17) to perform databackup 1708, and may delete the data originally stored in the MN-CSE1702. Then the MN-CSE 1702 has extra capacity to store the datacontinuously uploaded 1709 by the AE 1701, and continues to create thecontent instance 1710 for each request of the AE 1701. At this time,when other application entities (AEs) 1704 want to obtain the requiredtarget data from the MN-CSE 1702, the AE 1704 first performs target datadiscovery 1712 to the MN-CSE 1702, so as to obtain the address list ofthe required target data, and the stored information of the target datacan be obtained based on the obtained address list. For example, in FIG.17, part of the target data obtained based on the obtained address listis stored in the MN-CSE 1702, and part of the target data is backed upand stored in the CSE 1703. Then the AE 1704 sends a part target dataobtaining request 1714 to the MN-CSE 1702, and simultaneously sends apart target data obtaining request 1713 to the storage CSE 1703 as well.The storage CSE 1703 feeds back the part of the target data stored inthe storage CSE 1703 to the AE 1704 in response 1715 to the part targetdata obtaining request 1713, and the MN-CSE 1702 feeds back the part ofthe target data stored in the MN-CSE 1702 to the AE 1704 in response1716 to the part target data obtaining request 1714, thereby completingthe process of the AE 1704 obtaining all of the target data from theMN-CSE 1702.

FIG. 18 is a schematic diagram of an example in which other applicationentities obtain the required target data from the general service entityin the case where all of the data is stored in the storage CSE. Asillustrated in FIG. 18, the AE 1801 uploads data 1805 to the MN-CSE1802, and then the MN-CSE 1802 creates the content instance 1806 foreach request of the AE 1801. When the data uploaded by the AE 1801reaches the maximum capacity storage limit of the MN-CSE 1802, dataoverflow 1807 occurs. At this time, the MN-CSE 1802 may upload thestored data to other general service entities (for example, the storageCSE 1803 illustrated in FIG. 18) to perform data backup 1808, and maydelete the data originally stored in the MN-CSE 1802. Then the MN-CSE1802 has extra capacity to store the data continuously uploaded 1809 bythe AE 1801, and continues to create the content instance 1810 for eachrequest of the AE 1801. At this time, when other application entities(AEs) 1804 want to obtain the required target data from the MN-CSE 1802,the AE 1804 first performs target data discovery 1812 to the MN-CSE1802, so as to obtain the address list of the required target data, andthe stored information of the target data can be obtained based on theobtained address list. For example, in FIG. 18, the target data obtainedbased on the obtained address list is all stored in the storage CSE,then the AE 1804 sends a target data obtaining request 1813 to thestorage CSE 1803, and the storage CSE 1803 responds 1814 to the targetdata obtaining request 1813 and sends all of the target data stored inthe storage CSE 1803 to the AE 1804, thereby completing the process ofthe AE 1804 obtaining all of the target data from the MN-CSE 1802.Alternatively, the MN-CSE 1802 may be as illustrated in FIG. 16, theMN-CSE 1802 may send the target data obtaining request to the storageCSE 1803, then the storage CSE 1803 responds to the target dataobtaining request and sends the target data stored in the storage CSE1803 to the MN-CSE 1802, and the MN-CSE 1802 sends all the receivedtarget data to the AE 1804, thereby completing the process of the AE1804 obtaining the target data from the MN-CSE 1802.

Different methods for data storage are described above, which may beapplied in different fields. For example, when a driving recorderrecords data in real time, the method for data storage is basicallylocal storage, which is usually due to the storage space of the memorycard, so that the new data is stored by overwriting the old data. Insuch scenarios, once emergency scenes such as sudden brakes andcollisions occur, it is necessary to store the recordings in thatperiod. Even if the capacity of the memory card is full, certainspecific resources should be marked when implementing resourceoverwriting, so that these certain specific resources cannot beoverwritten by new image or video data and may be available insubsequent processing. In this case, the method for data storageprovided by the present disclosure as described above may be used, sothat the old data cannot be completely overwritten, so that the old datais available according to requirements. In the following, the steps ofusing the method for data storage provided by the present disclosure inthe case of storing the data recorded by the driving recorder in realtime are described.

1) Step one:

assuming that a vehicle collision occurs at time T1, the collisiontriggers settings, and the lock time period is set according to thestorage settings (for example, data of a period of two minutes prior tothe collision time and two minutes subsequent to the collision time isstored).

The attribute value overflowReserve includes list data addition fields(T1−2) min to (T1+2) min.

The attribute value overflowReserveStatus includes True, which meansthat the existing instance of the instance queue has been locked (thelocked content instance may not be deleted subsequent to the dataoverflow).

2) Step two:

when the memory card space occurs overflow, although the original datais overwritten, since there is already a lock strategy, the newlycreated data content instance may not overwrite the data prior to andsubsequent to the collision time.

3) Step three:

the data recording video at the collision time is verified, the datainstance at the collision time is obtained, and the lock status of thedata may be released after ensuring that the data instance is useless.For example, the list-type data deletion is performed on the attributevalue overflowReserve to delete original fields (T1−2) min to (T1+2)min, and in this way, the data corresponding to this time period maylose the lock attribute. When the memory card occurs overflow again, thedata corresponding to this time period may be deleted according to thecreation time.

For example, natural environment data records include data records ofextreme weather, such as storms, typhoons, tsunamis, etc. Because theabove data is sudden, large in quantity, and changes fast, and isdifferent from ordinary sensor data detection of smart home, hugeamounts of data may be uploaded in a short time. At the same time, theabove data has great value for scientific research and scientificapplication, and therefore has high-level importance. If the existingstandard implementation method is adopted, due to the sudden nature ofthe natural environment, it is impossible to predict the occurrencescale and duration and is difficult to estimate the data capacity. Oncethe data storage reaches the upper limit of data capacity, the hiddendanger of deleting old data for storing new data is the loss of thehidden value of important data.

According to the present disclosure, because of the importance ofnatural environment data, a complete backup method can be adopted. Inthe following, the steps of using the method for data storage providedby the present disclosure in the case of storing natural environmentdata are described.

1) Step one: performing the overflow setting (overflowCfg).

The overflow setting may be performed on the general service entity orcontent storage resource (container) corresponding to the applicationentity (for example, a sensor).

For example, the attribute value overflowStatus is set to False(representing the default value in the case where no overflow occurs),which means that no overflow is found in the data at the moment, and themaximum resource limit set for the general service entity still hasmargin.

The attribute value overflowCat is set to maxNrOflnstances. Because thesize of the own data has a basically certain data unit size based on thesensor properties, the sudden change in the number of instances is inlarge quantity in case of dealing with emergencies.

The attribute value overflowCtrl is set to True, which means that theretention strategy for overflow may be executed once an overflow eventoccurs.

The attribute value overflowOp is set to B, which means that if overflowoccurs, the stored data may be uploaded and backed up. For example, theroot directory location (overflowUpLoadPosition) attribute value of theupload resource is set to an address AAA.

2) Step two: implementing the retention strategy in case of emergencies.

In the case where overflow occurs (t=time1):

the attribute value overflowStatus of the resource overflowCfg may bethe first changed attribute value and may change from False to True; and

according to overflowOp=B, the resource backup is uploaded, the data inthe parent resource corresponding to the resource overflowCfg isuploaded to the address AAA, the time1 is added to theoverflowUploadTimePoint, and the resource address is backed up and addedto the overflowUploadList.

3) Step three: extracting and utilizing history data.

As described above, in the case where the general service entity uploadsand backs up the data stored in the application entity, otherapplication entities may obtain the required target data from thegeneral service entity through two steps: (1) obtaining the addresslist; (2) obtaining according to the address. When a user entity wantsto use history data at a certain moment in history, for example, whenthe user entity wants to obtain typhoon wind sampling data from 1st to8th days on the 20th day, the other application entities should firstperform the discovery operation on the MN-CSE (the registered CSE)corresponding to the application entity which uploads the data. Theoperation information specifies the time interval for data generation.The possible cases that the MN-CSE (the registered CSE) replies the datastorage address list to the other application entities include: all ofthe data being stored in the MN-CSE; part of the data being stored inthe MN-CSE, and part of the data being backed up and stored in the CSE;and all of the data being backed up and stored in the CSE.

As analyzed above, there are different strategies for differentsituations. For example, in the case where all of the target data isstored in the general service entity, other application entitiesdirectly extract the target data from the general service entity; in thecase where part of the target data is stored in the general serviceentity and part of the target data is backed up to other general serviceentities, the other application entities extract corresponding targetdata from the general service entity and the other general serviceentities, or the general service entity extracts part of the targetdata, which is not stored in the general service entity, from the othergeneral service entities and sends all of the target data to the otherapplication entities; and in the case where all of the target data isstored in the other general service entities, the other applicationentities directly extract the target data from the other general serviceentities, or the general service entity extracts the target data fromthe other general service entities and sends the target data to theother application entities. The above-mentioned different strategieshave been described in detail with reference to FIG. 15 to FIG. 18 inthe present disclosure, and therefore, details are not described herein.

As described above, the present disclosure provides a method for datastorage. FIG. 19 is a flowchart of a method for data storage accordingto still another embodiment of the present disclosure. As illustrated inFIG. 19, the method for data storage provided by the present disclosureincludes: by adopting an application entity, uploading data to a generalservice entity (S301); by adopting the general service entity, receivingdata sent by the application entity (S302); and in a case where dataoverflows, the general service entity selecting a retention strategy forstored data according to a lock setting or an overflow setting (S303);and the general service entity storing part or all of overflowed dataaccording to the retention strategy (S304).

The device 1900 for data storage according to the embodiments of thepresent disclosure is described below with reference to FIG. 20. FIG. 20is a schematic diagram of a device for data storage according to anembodiment of the present disclosure. Because the functions of thedevice for data storage provided by the embodiments are the same asthose of the method described above with reference to FIG. 2, andtherefore, detailed description of the same content is omitted hereinfor simplicity.

As illustrated in FIG. 20, the device 1900 for data storage includes areceiving unit 1901, a selection unit 1902, and a storage unit 1903. Itshould be noted that although the device 1900 for data storage isillustrated as including only three devices in FIG. 20, the above isonly illustrative, and the device 1900 for data storage may also includeone or more other devices, which do not involve the inventive conceptand therefore, are omitted herein.

The device 1900 for data storage provided by the present disclosureincludes: a receiving unit 1901, configured to receive data sent by anapplication entity by adopting a general service entity; a selectionunit 1902, configured to perform a lock setting or an overflow settingfor stored data in a case where data overflows and select a retentionstrategy for the stored data according to the lock setting or theoverflow setting; and a storage unit 1903, configured to store part orall of overflowed data according to the retention strategy.

The selection unit 1902 selects at least one of following retentionstrategies: performing a local backup of the stored data, uploading andbacking up the stored data, partially retaining the stored dataaccording to a point in time, partially retaining the stored dataaccording to a rate of change, partially retaining the stored dataaccording to a difference manner, and/or replacing the stored data withnewly uploaded data.

For example, the overflow setting further includes: sending an earlywarning notification to the application entity in a case where thestored data reaches the early warning threshold. For example, resourcewith subscription function in the general service entity correspondingto other application entities may also include the function of sendingthe early warning notification.

For example, the overflow setting includes whether to perform the locksetting on the data. For example, the lock setting includes performingthe lock setting on the stored data according to the lock time period orthe rate of change of lock data. For example, in the case where dataoverflows, stored data generated during a preset lock time period orstored data in accord with a preset range of the rate of change of lockdata may be locked and may not be deleted.

For example, the overflow setting further includes setting the specificoverflow category.

For example, the overflow setting further includes setting an overflowstatus of whether an overflow occurs.

For example, the overflow setting further includes setting whether acorresponding operation to be performed subsequent to the overflow.

For example, the overflow setting further includes setting the operationto be performed subsequent to the overflow.

The device 2000 for data storage according to another embodiment of thepresent disclosure is described below with reference to FIG. 21. FIG. 21is a schematic diagram of a device for data storage according to anotherembodiment of the present disclosure. Because the functions of thedevice for data storage provided by the embodiments are the same asthose of the method described above with reference to FIG. 14, andtherefore, detailed description of the same content is omitted hereinfor simplicity.

As illustrated in FIG. 21, the device 2000 for data storage includes areceiving-and-sending unit 2001, and a storage unit 2002. It should benoted that although the device 2000 for data storage is illustrated asincluding only two devices in FIG. 21, the above is only illustrative,and the device 2000 for data storage may also include one or more otherdevices, which do not involve the inventive concept and therefore, areomitted herein.

The device 2000 for data storage provided by the present disclosureincludes: a receiving-and-sending unit 2001, configured to upload datato a general service entity by adopting an application entity; and astorage unit 2002, configure to replace stored data with newly uploadeddata according to a retention strategy determined based on an overflowsetting of the general service entity in a case where data overflows. Inaddition, the receiving-and-sending unit 2001 may also receive an earlywarning notification sent by the general service entity in a case wherethe stored data reaches an early warning threshold.

The retention strategy includes at least one of following retentionstrategies: performing a local backup of the stored data, uploading andbacking up the stored data, partially retaining the stored dataaccording to a point in time, partially retaining the stored dataaccording to a rate of change, partially retaining the stored dataaccording to a difference manner, and/or replacing the stored data withnewly uploaded data.

For example, the overflow setting further includes: receiving an earlywarning notification sent by the general service entity in a case wherethe stored data reaches an early warning threshold.

For example, other application entities can obtain required target datafrom the general service entity. For example, other application entitiesobtaining required target data from the general service entity includes:in a case where all of the target data is stored in the general serviceentity, other application entities directly extract the target data fromthe general service entity; in a case where part of the target data isstored in the general service entity and part of the target data isbacked up to other general service entities, the other applicationentities extract corresponding target data from the general serviceentity and the other general service entities, or the general serviceentity extracts part of the target data, which is not stored in thegeneral service entity, from the other general service entities andsends all of the target data to the other application entities; and in acase where all of the target data is stored in the other general serviceentities, the other application entities directly extract the targetdata from the other general service entities, or the general serviceentity extracts the target data from the other general service entitiesand sends the target data to the other application entities.

According to still another aspect of the present disclosure, a computerreadable storage medium for storing a computer readable program isprovided, and the program enables a computer to perform the method fordata storage according to the above aspect of the present disclosure.

Those skilled in the art can understand that various aspects of thepresent disclosure can be explained and described through a number ofpatentable categories or situations, including any new and usefulprocess, machine, product, or combination of substances, or any new anduseful improvements thereto. Correspondingly, various aspects of thepresent disclosure can be completely executed by hardware, can becompletely executed by software (including firmware, resident software,microcode, etc.), or can be executed by a combination of hardware andsoftware. The above hardware or software can be referred to as “a datablock”, “a module”, “an engine”, “a unit”, “a component”, or “a system”.In addition, various aspects of the present disclosure may be embodiedas a computer product located in one or more computer-readable media,and the product includes computer readable program codes.

The present disclosure uses specific words to describe the embodimentsof the present disclosure. For example, “one embodiment”, “anembodiment”, and/or “some embodiments” may mean a certain feature,structure, or characteristic related to at least one embodiment of thepresent disclosure. Therefore, it should be emphasized and noted that“one embodiment”, “an embodiment”, or “an alternative embodiment”mentioned twice or more at different positions in this specification maynot necessarily refer to the same embodiment. In addition, certainfeatures, structures, or characteristics in one or more embodiments ofthe present disclosure can be appropriately combined.

Unless otherwise defined, all terms (including technical terms andscientific terms) used herein have the same meaning as commonlyunderstood by those skilled in the art to which the present disclosurebelongs. It should also be understood that terms such as those definedin ordinary dictionaries should be interpreted as having meaningsconsistent with the meanings in the context of related technologies, andshould not be interpreted in idealized or extremely formalized meanings,unless explicitly defined herein.

The above is an explanation of the present disclosure and should not beregarded as a limitation. Although several exemplary embodiments of thepresent disclosure have been described, those skilled in the art willreadily understand that many modifications can be made to the exemplaryembodiments without departing from the novel teachings and advantages ofthe present disclosure. Therefore, all these modifications are intendedto be included in the scope of the present disclosure defined by theclaims. It should be understood that the above is an explanation of thepresent disclosure, and should not be considered as being limited to thespecific embodiments disclosed, and modifications to the disclosedembodiments and other embodiments are intended to be included in thescope of the appended claims. The present disclosure is defined by theclaims and their equivalents.

1: A method for data storage, comprising: by adopting a general serviceentity, receiving data sent by an application entity; performing a locksetting or an overflow setting; selecting a retention strategy forpreviously stored data according to the lock setting or the overflowsetting in a case of satisfying a data overflow condition; and storingpart or all of received data according to the retention strategy. 2: Themethod according to claim 1, wherein selecting the retention strategyfor previously stored data according to the lock setting or the overflowsetting comprises: selecting at least one of following retentionstrategies for the stored data: performing a local backup of the storeddata and replacing the stored data with newly uploaded data, uploadingand backing up the stored data and replacing the stored data with thenewly uploaded data, partially retaining the stored data according to apoint in time and storing the newly uploaded data, partially retainingthe stored data according to a rate of change and storing the newlyuploaded data, or partially retaining the stored data according to adifference manner and storing the newly uploaded data. 3: The methodaccording to claim 1, wherein satisfying the data overflow conditioncomprises: satisfying a condition that the stored data reaches an earlywarning threshold. 4: The method according to claim 3, furthercomprising: sending an early warning notification to the applicationentity in a case where the stored data reaches the early warningthreshold. 5: The method according to claim 1, wherein satisfying thedata overflow condition comprises: satisfying a condition that dataoverflows. 6: The method according to claim 1, wherein performing theoverflow setting comprises: performing a lock setting to at least partof the stored data. 7: The method according to claim 1, whereinperforming the lock setting comprises: locking the stored data accordingto a lock time period or a rate of change of lock data, wherein, in thecase of satisfying the data overflow condition, stored datacorresponding to a preset lock time period or stored data in accord witha preset range of the rate of change of lock data is locked, and lockeddata is not deleted while storing newly received data. 8: The methodaccording to claim 7, further comprising: modifying the lock time periodor the range of the rate of change of lock data; and re-locking thestored data according to a modified lock time period or a modified rangeof rate of change of lock data. 9: The method according to claim 4,wherein the early warning notification comprises an early warningobject, an early warning category, and the early warning threshold. 10:The method according to claim 9, wherein the early warning categorycomprises one or more of a group consisting of a maximum bit value, amaximum number of instances, and a maximum instance service life. 11:The method according to claim 9, wherein performing the overflow settingfurther comprises: setting an overflow status of whether the earlywarning category overflows. 12: The method according to claim 1, whereinperforming the overflow setting further comprises: setting an operationto be performed subsequent to overflow. 13: The method according toclaim 12, wherein the operation to be performed subsequent to overflowcomprises at least one of following operations: setting an overflow timeinterval, setting an overflow replacement start point and an overflowvalue interval, or setting an overflow retention time. 14: The methodaccording to claim 3, wherein, in the condition that the stored datareaches the early warning threshold, an early warning notification issent to other application entities subscribing to resource of data inthe general service entity. 15: A method for data storage, comprising:by adopting an application entity, uploading data to a general serviceentity, wherein the data is stored in the general service entity; andreplacing stored data in the general service entity with newly uploadeddata according to a retention strategy determined based on a locksetting or an overflow setting of the general service entity in a caseof satisfying a data overflow condition. 16: The method according toclaim 15, wherein the retention strategy comprises at least one offollowing retention strategies: performing a local backup of the storeddata and replacing the stored data with the newly uploaded data,uploading and backing up the stored data and replacing the stored datawith the newly uploaded data, partially retaining the stored dataaccording to a point in time and storing the newly uploaded data,partially retaining the stored data according to a rate of change andstoring the newly uploaded data, or partially retaining the stored dataaccording to a difference manner and storing the newly uploaded data.17: The method according to claim 15, wherein satisfying the dataoverflow condition comprises: receiving an early warning notificationsent by the general service entity in a case where the stored datareaches an early warning threshold. 18: The method according to claim15, further comprising: other application entities obtaining requiredtarget data from the general service entity, wherein, in a case whereall of the target data is stored in the general service entity, one ormore application entities directly extract the target data from thegeneral service entity; in a case where part of the target data isstored in the general service entity and part of the target data isbacked up to other general service entities, the other applicationentities extract corresponding target data from the general serviceentity and the other general service entities, or the general serviceentity extracts part of the target data, which is not stored in thegeneral service entity, from the other general service entities andsends all of the target data to the other application entities; and in acase where all of the target data is stored in the other general serviceentities, the other application entities directly extract the targetdata from the other general service entities, or the general serviceentity extracts the target data from the other general service entitiesand sends the target data to the other application entities. 19.(canceled) 20: A general service entity device, comprising: a receivingunit, configured to receive data sent by an application entity; astorage unit, configured to store the data received by the receivingunit; and a selection unit, configured to perform a lock setting or anoverflow setting for stored data in a case of satisfying a data overflowcondition and select a retention strategy for the stored data accordingto the lock setting or the overflow setting of the stored data, whereinthe storage unit is further configured to store newly received dataaccording to the retention strategy.
 21. (canceled) 22: A computerreadable storage medium for storing a computer readable program, whereinthe program enables a computer to perform the method for data storageaccording to claim 1.